<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function timeout(num) {
            return new Promise(function(reslove, reject) {
                setTimeout(function() {
                    reslove(num);
                }, 1000)
            })
        };
        const arr = [timeout(10), timeout(20), timeout(30)];
        (async () => {
            for await (const iterator of arr) {
                console.log(iterator); // 10 20 30
            }
        })()
    </script>
</body>
</html>